using System;
using System.Collections.Generic;

namespace LibraryImport
{
    public static partial class Artists
    {
        /// <summary>
        /// Select audio files with correct id3 tags
        /// </summary>
        /// <param name="FolderNames"></param>
        /// <returns>Returns a string collection of artist names</returns>
        public static String[] GetArtistNames(List<String> FolderNames)
        {
            String[] FileNames = GetFileNames(FolderNames);
            List<String> ArtistNames = new List<string>();

            for (int i = 0; i < FileNames.Length; i++)
            {
                try
                {
                    ArtistNames.Add(GetID3ArtistTag(FileNames[i]));
                }
                catch (Exception)
                {
                }

                Frontend.ProgressPercentage = i * 100 / FileNames.Length;
            }

            return SmoothArtistNames(ArtistNames);
        }
    }
}